home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / visualar.lha / VisualArts25 / VAInstall / VisualArts.h < prev    next >
C/C++ Source or Header  |  1995-08-16  |  6KB  |  204 lines

  1. /*
  2. **  $Filename: VisualArts.h $
  3. **  $Includes, V2.5 $
  4. **  $Date: 95/04/22$
  5. **
  6. **
  7. **  (C) 1994-95 Danny Y. Wong              
  8. **  All Rights Reserved
  9. **
  10. **  DO NOT MODIFY
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <exec/memory.h>
  15. #include <exec/lists.h>
  16. #include <exec/nodes.h>
  17. #include <exec/ports.h>
  18. #include <exec/devices.h>
  19. #include <exec/io.h>
  20. #include <exec/libraries.h>
  21.  
  22. #include <devices/console.h>
  23. #include <devices/serial.h>
  24. #include <devices/clipboard.h>
  25.  
  26. #include <intuition/intuition.h>
  27. #include <intuition/intuitionbase.h>
  28. #include <intuition/gadgetclass.h>
  29. #include <intuition/imageclass.h>
  30. #include <intuition/classes.h>
  31. #include <intuition/icclass.h>
  32. #include <intuition/sghooks.h>
  33. #include <intuition/cghooks.h>
  34.  
  35. #include <gadgets/textfield.h>
  36.  
  37. #include <graphics/displayinfo.h>
  38. #include <graphics/gfxbase.h>
  39. #include <graphics/gfxmacros.h>
  40. #include <graphics/text.h>
  41.  
  42. #include <libraries/gadtools.h>
  43. #include <libraries/dos.h>
  44. #include <libraries/asl.h>
  45. #include <libraries/dosextens.h>
  46.  
  47. #include <workbench/workbench.h>
  48. #include <workbench/startup.h>
  49.  
  50. #include <clib/wb_protos.h>
  51. #include <clib/exec_protos.h>
  52. #include <clib/intuition_protos.h>
  53. #include <clib/gadtools_protos.h>
  54. #include <clib/graphics_protos.h>
  55. #include <clib/utility_protos.h>
  56. #include <clib/alib_protos.h>
  57. #include <clib/dos_protos.h>
  58. #include <clib/asl_protos.h>
  59.  
  60. #include <proto/textfield.h>
  61.  
  62. #include "string.h" 
  63. #include "stdio.h"
  64. #include "stdlib.h"
  65. #include "ctype.h"
  66.  
  67. #include "PopUpMenuClass.h" 
  68.  
  69. /* screemode flags */
  70.  
  71. #define ASLSM_INITIALAUTOSCROLL         1
  72. #define ASLSM_INITIALINFOOPENED         2
  73. #define ASLSM_DOWIDTH                   4
  74. #define ASLSM_DOHEIGHT                  8
  75. #define ASLSM_DODEPTH                   16
  76. #define ASLSM_DOOVERSCANTYPE            32
  77. #define ASLSM_DOAUTOSCROLL              64
  78. #define ASLSM_SLEEPWINDOW               128
  79.  
  80. /* font requester flags */
  81.  
  82. #define ASLFO_SLEEPWINDOW               1
  83. #define ASLFO_DOFRONTPEN                2
  84. #define ASLFO_DOBACKPEN                 4
  85. #define ASLFO_DOSTYLE                   8
  86. #define ASLFO_DODRAWMODE                16
  87. #define ASLFO_FOXEDWIDTHONLY            32
  88.  
  89. /* file requester flags */
  90.  
  91. #define ASLFR_DOSAVEMODE                1
  92. #define ASLFR_DOMULTISELECT             2
  93. #define ASLFR_DOPATTERNS                4
  94. #define ASLFR_DRAWERSONLY               8
  95. #define ASLFR_REJECTICONS               16
  96. #define ASLFR_FILTERDRAWERS             32
  97. #define ASLFR_SLEEPWINDOW               64
  98.  
  99.  
  100. /* to adjust the GUI if the window title is other than topaz 8
  101. */
  102. #define kWindowOffSetY  (Scr->Font->ta_YSize - 8)
  103.  
  104. /* context sensitive */
  105.  
  106. #define VA_Static       0x0001
  107. #define VA_ExpandX      0x0002
  108. #define VA_MoveX        0x0004
  109. #define VA_ExpandY      0x0008
  110. #define VA_MoveY        0x0010
  111.  
  112. /* defines for scroller window with super bitmap */
  113.  
  114. #define MAX_LEVEL          (0xFFFFL)
  115. #define LAYERXOFFSET(win)  (win->RPort->Layer->Scroll_X)  
  116. #define LAYERYOFFSET(win)  (win->RPort->Layer->Scroll_Y)  
  117.  
  118. /* clip board */
  119. struct cbbuf {
  120.  
  121.         ULONG size;     /* size of memory allocation            */
  122.         ULONG count;    /* number of characters after stripping */
  123.         UBYTE *mem;     /* pointer to memory containing data    */
  124. };
  125.  
  126. /* define for Image */
  127.  
  128. #ifndef IM
  129. #define IM(o)    ((struct Image *) o)
  130. #endif
  131.  
  132. /* define for determining the max value */
  133.  
  134. #ifndef MAX
  135. #define MAX(x,y) ((x) > (y) ? (x) : (y))
  136. #endif
  137.  
  138. /* for new menus in V38  */
  139.  
  140. #ifndef WA_NewLookMenus
  141.   #define WA_NewLookMenus         (WA_Dummy + 0x30)
  142. #endif
  143.  
  144. #ifndef  GTMN_NewLookMenus
  145. #define GTMN_NewLookMenus    GT_TagBase+67 /* ti_Data is boolean */
  146. #endif
  147.  
  148. #ifndef WFLG_NEWLOOKMENUS
  149. #define WFLG_NEWLOOKMENUS   0x00200000    /* window has NewLook menus    */
  150. #endif
  151.  
  152. /* macros for easy access to Gadget data */
  153.  
  154. #define GetString(gad)            (((struct StringInfo *)gad->SpecialInfo)->Buffer)
  155. #define GetUndoString(gad)    (((struct StringInfo *)gad->SpecialInfo)->UndoBuffer)
  156. #define GetNumber(gad)            (((struct StringInfo *)gad->SpecialInfo)->LongInt)
  157.  
  158. /* List node name.  Each node have the following */
  159.   
  160. struct NameNode
  161. {
  162.   struct Node nn_Node;  /* linked list node to previous or next node  */
  163.   UBYTE nn_Data[132];   /* name of the node, this is the same as      */
  164.                         /* nn_Node.ln_Name                            */
  165.   struct List *nn_List;
  166.   UBYTE UserData[16];
  167. };
  168.  
  169. /* Visual Arts message object.  Every GADGETUP event, the object is
  170.    sent to the attached function.  For Menus, the va_Gadget field is
  171.    always NULL.
  172. */
  173.  
  174. struct VAobject {
  175.   struct Window *va_Window;           /* window the object originated     */
  176.   struct Gadget *va_Gadget;           /* the gadget that sent this object */
  177.   struct IntuiMessage *va_IntuiMsg;   /* the IntuiMessage                 */
  178.   ULONG va_Flags;                     /* user flags                       */
  179.   APTR va_UserData;                   /* user data, function pointer etc..*/
  180. };
  181.  
  182. /* Every AREXX command have the following */
  183.  
  184. struct rexxCommandList
  185. {
  186.   char *name;       /* name of the AREXX command, note its case sensitive */
  187.   APTR userdata;    /* user data, in this case it's a function pointer    */ 
  188. };
  189.  
  190. /* Structure for Multi-Processing windows.  This structure is a linked
  191.    List for every window opened as Multi-Processing
  192. */
  193.  
  194. struct WindowNode
  195. {
  196.     struct Node nn_Node;            /* linked list to prev or next window */
  197.     UBYTE nn_Data[80];              /* window name */
  198.     struct Window *nn_Window;       /* window pointer */
  199.     struct AppWindow *nn_AppWindow; /* AppWindow pointer if window is a AppWindow */
  200.     struct MsgPort *nn_AppWindPort; /* AppWindow Port */
  201.     short ID;                       /* WindowNode ID  */
  202.     APTR UserData;                  /* window Handler for this window */
  203. };
  204.